<?php
// +----------------------------------------------------------------------
// | 幕小铺
// +----------------------------------------------------------------------
// | 版权所有 2016~2020 幕小铺科技（大连）有限公司
// +----------------------------------------------------------------------
// | 2020/03/14
// +----------------------------------------------------------------------
namespace app\video\behavior\add_comment_reply_after;
use util\Jpush;

/**
 * 视频评论后 发送极光消息
 * @package app\user_center\behavior\user
 * @author shiqiang
 */
class sendMessage{
    /**
     * 执行行为 run方法是Behavior唯一的接口
     * @access public
     * @return void
     */
    public function run($params){
		$uid 	 = $params['user_id'];
		$r_uid   = $params['r_uid'];
		
		$username = model('user_center/Member', 'model\user') -> find($uid) -> nick_name;

		$title = "幕小铺";
		$content = $username.'回复了你得评论。';
		$rel = controller('common/PushFactory', 'designpattern\push') -> setPush($type='');
		$result = $rel->setPushByAlias($alias=$r_uid, $title, $content);
		
    }
}
